package com.battery.system.mapper;

import com.battery.system.base.BaseMapper;
import com.battery.system.domain.BO.PurchaseBO;
import com.battery.system.domain.Purchase;
import com.battery.system.domain.VO.PurchaseVO;
import com.battery.system.domain.VO.PurchaseVV;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 采购订单Mapper接口
 *
 * @author battery
 * @date 2021-01-22
 */
public interface PurchaseMapper extends BaseMapper<Purchase> {


    /**
     * 查询采购订单
     *
     * @param id 采购订单ID
     * @return 采购订单
     */
    public Purchase selectPurchaseById(String id);

    /**
     * 查询采购订单列表
     *
     * @param purchase 采购订单
     * @return 采购订单集合
     */
    public List<Purchase> selectPurchaseList(Purchase purchase);

    /**
     * 新增采购订单
     *
     * @param purchase 采购订单
     * @return 结果
     */
    public int insertPurchase(Purchase purchase);

    /**
     * 修改采购订单
     *
     * @param purchase 采购订单
     * @return 结果
     */
    public int updatePurchase(Purchase purchase);

    /**
     * 删除采购订单
     *
     * @param id 采购订单ID
     * @return 结果
     */
    public int deletePurchaseById(String id);

    /**
     * 批量删除采购订单
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deletePurchaseByIds(String[] ids);

    List<PurchaseVV> selectPurchaseVVList(@Param("id") String id,
                                          @Param("status") Long status,
                                          @Param("order") String order);

    /**
     * 展示采购订单列表
     *
     * @param purchaseBO
     * @return
     */
    List<PurchaseVO> selectPurchaseVOList(@Param("purchaseBO") PurchaseBO purchaseBO);
}
